import {defineConfig} from 'vite';
import {ViteAliases} from 'vite-aliases';
import MyViteAliases from './plugins/my-vite-aliases.js';

export default defineConfig(() => {
  
  console.log(ViteAliases()); // {name: 'vite-aliases', enforce: 'pre', config: [Function: config]}
  console.log(MyViteAliases()); // {name: 'my-vite-aliases', enforce: 'pre', config: [Function: config]}
  
  return {
    /* resolve: {
      alias: {
        '@': path.resolve(__dirname, './src'),
        '@assets': path.resolve(__dirname, './src/assets'),
        '@components': path.resolve(__dirname, './src/components'),
      }
    }, */
    plugins: [
      /* ViteAliases({
        prefix: '@'
      }), */
      MyViteAliases({
        prefix: '@'
      })
    ]
  };
});